home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Arashi 1.1.1 / source code / Game Source / jam src / STInterface.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-02  |  1.6 KB  |  68 lines  |  [TEXT/KAHL]

  1. /*/
  2.      Project Arashi: STInterface.c
  3.      Major release: Version 1.1d2, 9/5/95
  4.  
  5.      Last modification: Tuesday, March 2, 1993, 19:05
  6.      Created: Tuesday, January 8, 1991, 8:38
  7.  
  8.      Copyright © 1991-1993, Juri Munkki
  9. /*/
  10.  
  11. #include "VA.h"
  12. #include "STORM.h"
  13. #include "PlayOptions.h"
  14.  
  15. /*
  16. >>    Called at program startup to allocate storage.
  17. */
  18. void    STAllocate()
  19. {
  20.     AllocParser();        /*    Allocate & init memory for game compiler.        */
  21.     AllocCracks();
  22.     AllocGrids();        /*    Allocate memory for grid structures.            */
  23.     AllocCStars();        /*    Allocate memory for center star structures.        */
  24.     AllocFlippers();    /*    Allocate memory for flippers.                    */
  25.     AllocPulsars();        /*    Allocate memory for pulsars.                    */
  26.     AllocSpikers();        /*    Allocate memory for spikers & spikes & -shots.    */
  27.     AllocFuseBalls();    /*    Allocate memory for fuseballs.                    */
  28.     AllocTankers();        /*    Allocate memory for tankers.                    */
  29.     AllocFloatingScores(); /* Allocate memory for floating scores (mz)        */
  30. }
  31. /*
  32. >>    Called at level startup to initialize variables.
  33. */
  34. void    STInitialize()
  35. {
  36.     InitCStars();
  37.     InitPlayer();
  38.     InitSpikes();
  39.     InitShots();
  40.     InitPlayer();
  41.     InitFlippers();
  42.     InitPulsars();
  43.     InitFuseBalls();
  44.     InitTankers();
  45.     InitCracks();
  46.     InitFloatingScores();    /* mz */
  47. }
  48. /*
  49. >>    Called each time through event/animation loop.
  50. */
  51. void    STUpdate()
  52. {
  53.     UpdateCStars();
  54.  
  55.     ThisLevel.edgeCount=0;    /*    Some routines below must update this variable!    */
  56.     ThisLevel.starCount=0;    /*    Same as above, if you need baby stars.            */
  57.  
  58.     UpdatePlayer();
  59.     UpdateFuseBalls(); /* */
  60.     UpdatePulsars();
  61.     UpdateFlippers(); /* */
  62.     UpdateShots();
  63.     UpdateSpikes();
  64.     UpdateTankers();
  65.     UpdateCracks();
  66.     if(PlayOptions->showfscores)
  67.         UpdateFloatingScores();    /* mz */
  68. }